﻿using RepositoryEntity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IRepositoryBll
{
    /// <summary>
    /// 用户信息业务访问层接口
    /// </summary>
    public interface IUserInfoBll : IBaseDeleteBll<UserInfo>
    {
        // bool AddUserInfo(UserInfo userInfo);

        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="userInfoId">用户id</param>
        /// <returns></returns>
        // bool DeleteUserInfo(string userInfoId);

        /// <summary>
        /// 软删除用户
        /// </summary>
        /// <param name="userInfoId"></param>
        /// <returns></returns>
        //bool SoftDeleteUserInfo(string userInfoId);

        //更新修改
       // bool UpdateUserInfo(UserInfo userInfo);

        bool UpdateUserInfo(string userInfoId, string userName, int sex, string phoneNum ,string departmentId);

        /// <summary>
        /// 通过id获取用户
        /// </summary>
        /// <param name="userInfoId"></param>
        /// <returns></returns>
        //UserInfo GetUserInfo(string userInfoId);

        List<UserInfo> GetUserInfoList();
        //登录

        UserInfo GetUserInfoByLogin(string account, string passWord);

        /// <summary>
        /// 获取用户集合（分页）
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        object GetUserInfoListByPage(int page, int limit, out int count, string userName, string phoneNum);
        //登录
        /* bool LoginBll(string Account, string PassWord);*/
        /// <summary>
        /// 获取领导(用户)下拉数据集合
        /// </summary>
        /// <returns></returns>
        object GetSelectOption();

        /// <summary>
        /// 密码修改
        /// </summary>
        /// <param name="oldPwdMD5"></param>
        /// <param name="newPwdMD5"></param>
        /// <param name="userInfo"></param>
        /// <param name="msg"></param>
        /// <returns></returns>
        bool EditPassword(string oldPwdMD5, string newPwdMD5, UserInfo userInfo, out string msg);
    }
}
